package cn.seaboot.admin.file.bean;

import io.swagger.v3.oas.annotations.media.Schema;
import javax.validation.constraints.Size;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * POJO
 * 系统文件 [t_sys_file]
 *
 * @author Mr.css
 * @version 2018-08-11 22:29
 */
@Schema(description = "系统文件 [t_sys_file] 实体类")
public class SysFile implements Serializable {
    private static final long serialVersionUID = 2628456002817969998L;
    /**
     * ID
     */
    @NotNull()
    @Schema(description = "ID")
    private String id;
    /**
     * 机构ID
     */
    @Schema(description = "机构ID")
    private String orgId;
    /**
     * 所属文件夹
     */
    @Schema(description = "所属文件夹")
    private String folderId;
    /**
     * 上传用户
     */
    @Schema(description = "上传用户")
    private String userId;
    /**
     * 文件名
     */
    @NotNull
    @Size(max = 48)
    @Schema(description = "文件名")
    private String fileName;
    /**
     * 扩展名
     */
    @Size(max = 8)
    @Schema(description = "扩展名")
    private String extension;
    /**
     * 文件大小
     */
    @Schema(description = "文件大小")
    private Long fileSize;
    /**
     * 文件路径（文件夹子路径，用于组织更复杂的业务）
     */
    @Size(max = 64)
    @Schema(description = "文件路径")
    private String filePath;
    /**
     * 文件类型（唯一确定一种类型的数据）
     */
    @Schema(description = "文件类型")
    private String fileType;
    /**
     * 创建日期
     */
    @Schema(description = "创建日期")
    private LocalDateTime gmtCreate;
    /**
     * 修改日期
     */
    @Schema(description = "修改日期")
    private LocalDateTime gmtModified;

    public LocalDateTime getGmtCreate() {
        return gmtCreate;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getOrgId() {
        return orgId;
    }

    public void setOrgId(String orgId) {
        this.orgId = orgId;
    }

    public String getFolderId() {
        return folderId;
    }

    public void setFolderId(String folderId) {
        this.folderId = folderId;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getFileName() {
        return fileName;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }

    public String getExtension() {
        return extension;
    }

    public void setExtension(String extension) {
        this.extension = extension;
    }

    public Long getFileSize() {
        return fileSize;
    }

    public void setFileSize(Long fileSize) {
        this.fileSize = fileSize;
    }

    public String getFilePath() {
        return filePath;
    }

    public void setFilePath(String filePath) {
        this.filePath = filePath;
    }

    public void setGmtCreate(LocalDateTime gmtCreate) {
        this.gmtCreate = gmtCreate;
    }

    public LocalDateTime getGmtModified() {
        return gmtModified;
    }

    public void setGmtModified(LocalDateTime gmtModified) {
        this.gmtModified = gmtModified;
    }

    public String getFileType() {
        return fileType;
    }

    public void setFileType(String fileType) {
        this.fileType = fileType;
    }

    @Override
    public String toString() {
        return "SysFile{" +
                "id=" + id +
                ", orgId=" + orgId +
                ", folderId=" + folderId +
                ", userId=" + userId +
                ", fileName='" + fileName + '\'' +
                ", extension='" + extension + '\'' +
                ", fileSize=" + fileSize +
                ", filePath='" + filePath + '\'' +
                ", fileType=" + fileType +
                ", gmtCreate=" + gmtCreate +
                ", gmtModified=" + gmtModified +
                '}';
    }
}
